import axios from 'axios';

import {ALL_SERVICE_API} from '../api';

// 根据ID获取司机信息
export const getDriverInfo = id => {
  return axios.get(ALL_SERVICE_API + '/driver-infos/' + id);
};

// 搜索司机列表
export const searchDriverInfo = params => {
  return axios.get(ALL_SERVICE_API + '/driver-infos', {params: params});
};

// 删除司机
export const delDriver = id => {
  return axios.delete(ALL_SERVICE_API + '/driver-infos/' + id);
};

// 保存司机
export const saveDriverInfo = (params) => {
  return axios.post(ALL_SERVICE_API + '/driver-infos', params);
};
